package com.itheima.test02;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test {
    public static void main(String[] args) {
        HashMap<String, String> map = new HashMap<>();
        map.put("111", "aaa");
        map.put("222", "bbb");
        map.put("333", "ccc");
        map.put("444", "ddd");
        map.put("555", "eee");
        map.put("666", "fff");
        System.out.println(map);
        Set<String> mapKey = map.keySet();
        for (String s : mapKey) {
            System.out.print(s+" ,"+map.get(s)+"|");
        }
        System.out.println();
        Set<Map.Entry<String, String>> pairs = map.entrySet();
        for (Map.Entry<String, String> pair : pairs) {
            System.out.print(pair.getKey()+","+pair.getValue()+"  |||  ");
        }


    }
}
